package service.impl;

import mapper.CollectionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.Collection;
import service.ICollectionService;
@Service
public class CollectionServiceImpl implements ICollectionService {
    @Autowired
    private CollectionMapper collectionMapper;
    @Override
    public Collection getCollectionByMany(Collection collection) {
        Collection collection1 =   collectionMapper.selectByMany(collection);
        return collection1;
    }

    @Override
    public int addCollection(Collection collection) {
        int i = collectionMapper.insertSelective(collection);
        return i;
    }

    @Override
    public int removeCollectionByMany(Collection collection) {
        int i = collectionMapper.deleteByMany(collection);
        return i;
    }
}
